import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Demo3{
    public static int count(int n){
        if (n <= 4){
            return n;
        }else {
            int a = 0;
            a += count(n - 4);
            int b = 0;
            b += count(n -1);
            int c = 0;
            c += count(n -3);
            int d = 0;
            d += count(n -2);
            int m = a * b - c * d;
            System.out.println(a+ " " + b + " " + c + " " + d + "=" + m);
            return m;
        }
    }
    public static void main(String[] args) {
        System.out.println(count(10));
    }
}
